package com.learning.springmybatis.service.impl;

import com.learning.springmybatis.dao.UserMapper;
import com.learning.springmybatis.entity.User;
import com.learning.springmybatis.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;


@Service
public class UserServiceImpl implements UserService {

    private final UserMapper userMapper;

    public UserServiceImpl(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public User getName(Integer id) {

        return userMapper.getName(id);
    }
}
